<!-- Copyright 2020 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->
<!--
TODO(crbug.com/1259303): resolve this hack
Hack: if device_disabled screen would load (and register) as first screen,
code in DisplayManager.showScreen() would prevent rest of the code from working
correctly. Adding a phony dependency to other screen makes that screen register
first, and prevents such error.
-->
<link rel="import" href="/screens/common/user_creation.html">

<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">

<link rel="import" href="../../components/oobe_icons.html">
<link rel="import" href="../../components/behaviors/login_screen_behavior.html">
<link rel="import" href="../../components/behaviors/oobe_dialog_host_behavior.html">
<link rel="import" href="../../components/behaviors/oobe_i18n_behavior.html">
<link rel="import" href="../../components/common_styles/common_styles.html">
<link rel="import" href="../../components/common_styles/oobe_dialog_host_styles.html">
<link rel="import" href="../../components/dialogs/oobe_adaptive_dialog.html">
<link rel="import" href="../../components/display_manager_types.html">

<dom-module id="device-disabled-element">
  <template>
    <style include="oobe-dialog-host-styles">
      #message {
        @apply --oobe-default-font;
        color: var(--oobe-text-color);
        overflow: auto;
        text-overflow: clip;
        white-space: pre-wrap;
        word-wrap: break-word;
      }
    </style>

    <oobe-adaptive-dialog title-key="deviceDisabledHeading" id="dialog"
        role="dialog"
        aria-label$="[[i18nDynamic(locale, 'deviceDisabledHeading')]]">
      <iron-icon slot="icon" icon="oobe-32:warning"></iron-icon>
      <h1 slot="title">
        [[i18nDynamic(locale, 'deviceDisabledHeading')]]
      </h1>
      <div slot="subtitle">
        [[disabledText_(locale, serial_, enrollmentDomain_)]]
      </div>
      <div slot="content" class="flex layout vertical center center-justified">
        <div id="message">[[message_]]</div>
        <img src="/images/device-disabled.svg"
            class="oobe-illustration flex" aria-hidden="true">
      </div>
    </oobe-adaptive-dialog>
  </template>
  <script src="device_disabled.js"></script>
</dom-module>
